#import <GraphicsServices/GraphicsServices.h>
#import <UIKit/UIApplication.h>

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>

#define DEFAULT_PANEL_PATH	@"/private/var/mobile/Library/TouchRemocon"

@class NSArray;

@class UIWindow;
@class UITransitionView;

@class PreferencesView;
@class Panel;

@interface Application : UIApplication 
{
	// window
	UIWindow *window;
	
	// preferences view
	PreferencesView *prefs;
	
	// main view
	UITransitionView *view;
	
	// panel
	NSArray *panels;
	int currentPanelIndex;
	BOOL panelLocked;
	
	// socket
	int sock;
	struct sockaddr_in addr;
	
	// status bar
	CGPoint statusBarMouseDownPoint;
}

- (id)nextPanel;
- (id)prevPanel;
- (id)currentPanel;

+ (void)initialize;

- (void)dealloc;

- (void)applicationDidFinishLaunching: (id)unused;

// panel delegate
- (void)keyClicked: (unsigned char)key;
- (void)keyPressed: (unsigned char)key;
- (void)keyReleased: (unsigned char)key;

/*
// navigation bar delegate
- (void)navigationBar: (UINavigationBar*)navigationBar buttonClicked: (int)button;
*/

// status bar event
- (void)statusBarMouseDown: (GSEventRef)event;
- (void)statusBarMouseUp: (GSEventRef)event;
/*
- (void)statusBarMouseDragged: (GSEventRef)event;
*/
@end
